class UrlMappings {
    /*
    static mappings = {
    "/$controller/$action?/$id?"{
    constraints {
    // apply constraints here
    }
    }
     */   
        
    static mappings = {
       "/$controller/$action?/$id?"{
            constraints {
                controller(matches:/.*[^(services)].*/)
            }
        }
    
        "/archetypesdetails" {
            controller="archetype"
            action=[
                GET:'getAllDetails'
            ]
        }        

        "/archetypes/$path/$nombreArchivo/$version" {
            controller="archetype"                
            action=[
                GET:'get'
            ]
        }
        
        "/templatesdetails" {
            controller="templates"
            action=[
                GET:'getAllDetails'
            ]
        }
        
        "/templates/$path/$nombreArchivo/$version" {
            controller="templates"                
            action=[
                GET:'get'
            ]
        }
        
        "/layoutdetails" {
            controller="layout"
            action=[
                GET:'getAllDetails'
            ]
        }
        
        "/layout/$path/$nombreArchivo/$version" {
            controller="layout"                
            action=[
                GET:'get'
            ]
        }
        
        "/savetemplate" {
            controller="templates"                
            action=[
                POST:'saveTemplate'
            ]
        }
            
        "/"(view:"/index")
        "500"(view:'/error')           
    }
}
